<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="root">
        <h2>我{{name}}你</h2>
        <button @click = "showInfo">点我亲你一下</button>
    </div>

    <script>
        const vm = new Vue({
            el:'#root',
            data:{
                name:'喜欢'
            },
            methods:{
                showInfo(){
                    alert('么么')
                }
            }
        })
    </script>
</body>
</html>